import torch
import torch.nn as nn

def train_with_fgm(model, dataloader, device, num_epochs=10):
    # 定义损失函数和优化器
    criterion = nn.CTCLoss(blank=0) # 空白索引为0
    